package com.gastronomy.dao;

import java.util.List;

import com.gastronomy.entity.User;

public interface UserDao {
	public User queryUserById(Integer userId);

	/**
	 * 根据用户名和密码查找用户
	 * @param loginName
	 * @param loginPwd
	 * @return
	 */
	public User findUserByNameAndPwd(String loginName, String loginPwd);

	/**
	 * 
	 * @param user
	 */
	public void addUser(User user);
	/**
	 * 新增商户信息(全面)
	 * @param user
	 */
	public void addBusinessUser(User user);

	/**
	 * 根据角色查找用户
	 * @param roleTypes
	 * @return
	 */
	public List<User> litsUsers(Integer[] roleTypes);

	public void lockUsers(String[] allIds);
	public void unLockUsers(String[] allIds);

	public List<User> sortBusinessByNickName(String nickName);

	public List<User> sortBusinessByCreateTime(String nickName);

	public User getUserByLoginName(String loginName);
}
